import { ClientMessage } from "@runtime/generate/message/ClientMessage";
import DeviceComponent from "@runtime/module/Device/DeviceComponent";
import MessageHandler from "@runtime/module/Handler/MessageHandler";
import BinocularCameraComponent from "@components/Apps/BinocularCamera/BinocularCameraComponent";
/**
 * 设备更新消息处理器
 */
export default class DeviceUpdateMessageHandler extends MessageHandler<ClientMessage.DeviceUpdateMessage> {
    protected async RunAsync(message: ClientMessage.DeviceUpdateMessage): Promise<void> {
        // console.log('设备状态信息更新消息处理器',message);
        BinocularCameraComponent.Default.connect.value = message.Informations[0].Status
        DeviceComponent.Default.Update(message.Informations);
    }
}
